MarkLogic Server 11.0 Product Documentation
PUT /manage/v2/databases/{id|name}/partition-queries/{partition-number}/properties

Summary

Modify the query assignment policy for the query partition identified by {partition-number} in the database identified by {id|name}.

URL Parameters
format The format of the requested data. Can be html, json or xml (default). If present, the format parameter overrides the Accept header.
Request Headers
Accept The expected MIME type of the response. If the format parameter is present, it takes precedence over the Accept header. Supported values: application/xml, application/json.
Content-type The MIME type of the data in the request body. Supported values: application/xml, application/json.
Response Headers
Content-type The MIME type of the data in the response body. Depending upon the value of the format parameter or Accept header, one of application/xml, application/json, or text/html.

Response

Upon success, MarkLogic server returns status code 200 (OK). If the payload is malformed, a status code of 400 (Bad Request) is returned. A status code of 401 (Unauthorized) is returned if the user does not have the necessary privileges.

Required Privileges

This operation requires the manage-admin role, or the following privilege:

http://marklogic.com/xdmp/privileges/manage-admin

Usage Notes

availability

Availability of the forest data.

updates-allowed

The kinds of updates that should be allowed for this forest.

query-exclusion

Example


curl -X POST  --anyauth -u admin:admin -H "Content-Type:application/xml" \
-d '<partition-query-properties xmlns="http://marklogic.com/manage/partition-query/properties">
      <partition-number>2</partition-number>
        <query>
          <cts:or-query xmlns:cts="http://marklogic.com/cts">
            <cts:word-query>
               <cts:text xml:lang="en">Project Manager</cts:text>
            </cts:word-query>
            <cts:word-query>
               <cts:text xml:lang="en">Project Manager</cts:text>
            </cts:word-query>
          </cts:or-query>
        </query>
    </partition-query-properties>' \
http://gordon-1:8002/manage/v2/databases/Schemas/partition-queries/2/properties
    

Example


curl -X POST --anyauth --user admin:admin -H "Content-type: application/json" \
-d '{
    "partition-number": 2,
    "query": {
        "orQuery": {
            "queries": [
                {
                    "wordQuery": {
                        "text": [
                            "Project Manager"
                        ],
                        "options": [
                            "lang=en"
                        ]
                    }
                },
                {
                    "wordQuery": {
                        "text": [
                            "Project Manager"
                        ],
                        "options": [
                            "lang=en"
                        ]
                    }
                }
            ]
        }
    }
}' \
http://gordon-1:8002/manage/v2/databases/Schemas/partition-queries/2/properties

    
Powered by MarkLogic Server | Terms of Use | Privacy Policy